-
Notifications
You must be signed in to change notification settings - Fork 747
fix(amazonq): discard/reject edit suggestion if it isn't valid #7848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
⏳ I'm reviewing this pull request for security vulnerabilities and code quality issues. I'll provide an update when I'm done |
|
|
✅ I finished the code review, and didn't find any security or code quality issues. |
|
|
||
| const isPatchValid = applyPatch(e.document.getText(), item.insertText as string) | ||
| if (!isPatchValid) { | ||
| vscode.commands.executeCommand('aws.amazonq.inline.rejectEdit') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shoudl add an await
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I explicitly didn't add an await since this is in documentChangeListener we want this to be fast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
) ## Problem discard when it's not yet shown. reject when user's typing and makes the diff invalid. ## Solution --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
Problem
discard when it's not yet shown.
reject when user's typing and makes the diff invalid.
Solution
feature/xbranches will not be squash-merged at release time.